package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.system.domain.Evt;
import com.ruoyi.system.domain.LargeScreenCount;
import com.ruoyi.system.domain.MapModel;
import com.ruoyi.system.service.LargeScreenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/largeScreen")
public class LargeScreenController extends BaseController {

    @Autowired
    private LargeScreenService largeScreenService;
    private String prefix = "largeScreen";
    /**
     * 大屏主页显示
     */

    @GetMapping("/view")
    public String view() {
        return prefix + "/view";
    }

    /**
     * 大屏统计显示
     */

    @PostMapping("/count")
    @ResponseBody
    public LargeScreenCount count()
    {
        return largeScreenService.count();
    }

    /**
     * 大屏事件列表数据显示
     */

    @PostMapping("/selectEvt")
    @ResponseBody
    public List<Evt> selectEvt(MapModel mapModel)
    {
        return largeScreenService.selectEvt(mapModel);
    }

    /**
     * 大屏地图事件数量数据显示
     */

    @PostMapping("/selectEvtCount")
    @ResponseBody
    public List<MapModel> selectEvtCount()
    {
        return largeScreenService.selectEvtCount();
    }
    /**
     * 大屏地图事件数量数据显示
     */

    @PostMapping("/selectSearchResultCount")
    @ResponseBody
    public List<MapModel> selectSearchResultCount()
    {
        return largeScreenService.selectSearchResultCount();
    }
    /**
     * 大屏本年度事件数量按月显示
     */

    @PostMapping("/selectEvtYearCount")
    @ResponseBody
    public List<MapModel> selectEvtYearCount()
    {
        return largeScreenService.selectEvtYearCount();
    }
    /**
     * 大屏事件/检索数量按30天、60天、90天、365天显示
     */

    @PostMapping("/selectEvtCountAll")
    @ResponseBody
    public List<MapModel> selectEvtCountAll()
    {
        return largeScreenService.selectEvtCountAll();
    }
    /**
     * 大屏本年度检索数量按月显示
     */

    @PostMapping("/selectResultYearCount")
    @ResponseBody
    public List<MapModel> selectResultYearCount()
    {
        return largeScreenService.selectResultYearCount();
    }
    /**
     * 大屏检索规则类型占比图显示
     */

    @PostMapping("/selectResultType")
    @ResponseBody
    public List<MapModel> selectResultType()
    {
        return largeScreenService.selectResultType();
    }
    /**
     * 大屏检索规则类型占比图显示
     */

    @PostMapping("/selectResultRule")
    @ResponseBody
    public List<MapModel> selectResultRule()
    {
        return largeScreenService.selectResultRule();
    }
}
